docs: add legends and colorbars example - #18
Open
timtreis wants to merge 2 commits into
Open
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
📖 Docs preview: https://scverse.org/spatialdata-plot-tutorials/pr-18/gallery.html Built from 903e8d2; redeployed on every push. |
New examples/legends_and_colorbars.ipynb on the real Visium mouse-brain dataset (squidpy), covering the show() legend/colorbar surface: - categorical legend placement across positions (legend_loc: matplotlib locations and 'right margin') and restyling (legend_fontsize/fontweight/ fontoutline, legend_title) - na_in_legend (with groups) and the bundled legend_params dict - continuous colorbar on/off and colorbar_params (label, orientation, loc) - channels_as_legend: a channel legend for a multichannel image (Xenium cells fluorescence) - a legend and a colorbar side by side in a multi-panel color=[...] figure Executed against spatialdata-plot v0.4.1; committed with outputs. Adds the examples gallery card + toctree + thumbnail. Closes the P1.1 gap from the 0.4.0/0.4.1 doc-coverage analysis.
timtreis
force-pushed
the
feat/legends-colorbars
branch
from
August 19, 2026 02:26
d584a91 to
a7f4b68
Compare
…efine categorical/continuous, note legend_title not a legend_params key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
examples/legends_and_colorbars.ipynbdocumenting theshow()legend/colorbar surface — a large previously-undocumented API area (every coloured plot has a key).Real 10x Visium mouse-brain dataset (
squidpy.datasets.visium_hne_sdata()):spotsannotated with named-regionclusterlabels (categorical → legend) and per-spot counts (continuous → colorbar).Covers:
legend_loc(matplotlib locations and'* margin'),legend_fontsize/fontweight/fontoutline,legend_titlena_in_legend(withgroups) and the bundledlegend_paramsdictcolorbaron/off andcolorbar_params(label,orientation,loc)color=[...]figureExecuted against spatialdata-plot v0.4.1, committed with outputs. Adds the examples gallery card + toctree + thumbnail.
Part of the documentation-expansion series from the 0.4.0/0.4.1 gap analysis (P1.1).